#define _CRT_SECURE_NO_WARNINGS 1
//#include"vector.h"
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

int main()
{
	vector<int> v1;
	v1.push_back(213);
	v1.push_back(12);
	v1.push_back(3);
	v1.push_back(0);
	v1.push_back(27);

	sort(v1.begin(), v1.end());
	auto it1 = v1.begin();
	while (it1 != v1.end())
	{
		cout << *it1 << " ";
		++it1;
	}
	cout << endl;

	greater<int> gt;
	sort(v1.begin(), v1.end(), gt);
	auto it2 = v1.begin();
	while (it2 != v1.end())
	{
		cout << *it2 << " ";
		++it2;
	}
	cout << endl;

	return 0;
}